<template>
    <view class="content">
        <image src="../../static/image/s_img_11.jpg" class="s-img-11"></image>
        <u-navbar :background="background" title="我的余额" title-color="#000" :border-bottom="false" :immersive="true"
            :is-back="true" back-icon-color="#000"></u-navbar>
            
        <view class="wrapper" :style="{marginTop: statusBar + 50 + 'px'}">
            <view class="top">
                <view class="u-flex">
                    <image src="/static/icon/avatar.png" class="avatar"></image>
                    <view class="name">用户名</view>
                </view>
                <view class="info-down">
                    <view>
                        <view>当前余额</view>
                        <view class="price">￥<text class="price-num">2329</text></view>
                    </view>
                    <view class="y-btn" @click="$gTo(`/serve/pages/balance/balance-list`)">余额变更记录</view>
                </view>
            </view>
            
            <view>
                <view class="title">
                    <view>提现金额</view>
                </view>
                <input type="digit" placeholder="请输入金额" class="t-inp">
            </view>
            
            <view class="down-box">
                <view class="title">
                    <view>提现金额</view>
                    <view class="card">
                        <image src="../../static/icon/card.png" class="card-icon"></image>
                        <view>银行卡</view>
                    </view>
                </view>
                <view class="box">
                    <view class="item">
                        <image src="../../static/icon/s_icon_08.png" class="s-icon-08"></image>
                        <input type="text" placeholder="开户行名称" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="item">
                        <image src="../../static/icon/s_icon_09.png" class="s-icon-08"></image>
                        <input type="text" placeholder="开户姓名" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="item">
                        <image src="../../static/icon/s_icon_10.png" class="s-icon-08"></image>
                        <input type="text" placeholder="银行卡号" placeholder-class="p-inp" class="inp">
                    </view>
                    <view class="item">
                        <image src="../../static/icon/s_icon_11.png" class="s-icon-08"></image>
                        <input type="number" placeholder="手机号" placeholder-class="p-inp" class="inp">
                    </view>
                </view>
                
                <view class="btn">确认提现</view>
            </view>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                statusBar: 0,
                background: { backgroundColor: 'rgba(255,255,255,0)' },
            };
        },
        onLoad() {
            let _this = this;
            //状态栏高度
            uni.getSystemInfo({
            	success: function(res) {
            		_this.statusBar = res.statusBarHeight;
            	}
            });
        },
        methods: {
            onPageScroll: function(e) {
            	//nvue暂不支持滚动监听，可用bindingx代替
            	// console.log("滚动距离为：" + e.scrollTop);
            	let a = e.scrollTop * 0.05;
            	if (a > 1) {
            		a = 1;
            	}
            	if (e.scrollTop == 0) {
            		this.background.backgroundColor = 'rgba(0,0,0,0)';
            	} else {
            		this.background.backgroundColor = 'rgba(255,255,255,' + a + ')';
            	}
            },
        }
    };
</script>

<style lang="scss">
    
    page{
        background-color: #fff;
    }
    .s-img-11{
        width: 750rpx;
        height: 562rpx;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
    }
    .wrapper{
        padding: 30rpx;
    }
    .top{
        padding: 50rpx;
        background: linear-gradient(to right, rgba(255,194,96,.7), rgba(239,151,2,.7));
        border-radius: 20rpx;
        margin-bottom: 100rpx;
    }
    .avatar{
        width: 85rpx;
        height: 85rpx;
        border: 2rpx solid #fff;
        border-radius: 50%;
        margin-right: 20rpx;
    }
    .name{
        flex: 1;
        font-size: 36rpx;
        color: #fff;
    }
    .info-down{
        padding-top: 30rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        font-size: 24rpx;
    }
    .price{
        font-size: 34rpx;
    }
    .price-num{
        font-size: 56rpx;
    }
    .y-btn{
        line-height: 1;
        padding: 15rpx 17rpx;
        background-color: #20212c;
        border-radius: 50rpx;
    }
    
    
    .title{
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 32rpx;
        font-weight: bold;
        padding-bottom: 20rpx;
    }
    .card{
        font-size: 26rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .card-icon{
        width: 51rpx;
        height: 33rpx;
        margin-right: 10rpx;
    }
    .t-inp{
        width: 100%;
        height: 90rpx;
        padding: 0 25rpx;
        background-color: #f4f4f4;
        border-radius: 10rpx;
        margin-bottom: 30rpx;
    }
    .down-box{
        padding-top: 30rpx;
        border-top: 2rpx solid #e6e6e6;
    }
    .box{
        background-color: #f4f4f4;
        padding: 0 30rpx;
        border-radius: 15rpx;
    }
    .item{
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 30rpx 0;
        border-bottom: 2rpx solid #e7e5ed;
        font-size: 26rpx;
    }
    .item:last-child{
        border-bottom: none;
    }
    .s-icon-08{
        width: 33rpx;
        height: 33rpx;
        margin-right: 10rpx;
    }
    .inp{
        flex: 1;
    }
    .p-inp{
        color: #000;
    }
    .btn{
        font-size: 34rpx;
        color: #fff;
        text-align: center;
        padding: 25rpx;
        background-color: #f29700;
        border-radius: 10rpx;
        margin-top: 50rpx;
    }
    

</style>
